#include "Texture2D.h"

using namespace Renderer;


ReadPixelBuffer* Renderer::Texture2D::CopyToBuffer(ImageFormat format, ImageDatatype dataType)
{
	return CopyToBuffer(format, dataType, 4);
}

void Renderer::Texture2D::CopyFromBuffer(WritePixelBuffer* pixelBuffer, ImageFormat format, ImageDatatype dataType, int rawAlignment)
{
	auto desctiption = GetDescription();
	CopyFromBuffer(pixelBuffer, 0, 0, desctiption.GetWidth(), desctiption.GetHeight(), format, dataType, rawAlignment);
}

void Renderer::Texture2D::CopyFromBuffer(WritePixelBuffer* pixelBuffer, ImageFormat format, ImageDatatype dataType)
{
	auto desctiption = GetDescription();
	CopyFromBuffer(pixelBuffer, 0, 0, desctiption.GetWidth(), desctiption.GetHeight(), format, dataType, 4);
}
